package com.kb.design.enums;

import com.google.common.base.Objects;
import lombok.Data;

/**
 * @Auther:chenzx
 * @Date:2024-02-26
 * @Description:审核类型
 */
public enum ReviewType {

    Unaudited("未审核", 0),
    LAYOUT_APPROVAL("布局审核", 1),
    WIRING_APPROVAL("布线审核", 2),
    APPROVAL_COMPLETE("审核完成", 3);


    private String key;
    private Integer value;
    // 构造方法
    private ReviewType(String key, Integer value) {
        this.key = key;
        this.value = value;
    }
    // 普通方法
    public static Integer getValue(String key) {
        for (ReviewType c : ReviewType.values()) {
            if (Objects.equal(key , c.getKey())) {
                return c.value;
            }
        }
        return null;
    }
    // get set 方法
    public void setKey(String key) {
        this.key = key;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public Integer getValue() {
        return value;
    }
}
